import request from '@/utils/request'

// 查询精品项目库列表
export function listProjectLibrary(query) {
  return request({
    url: '/projectWorkbench/projectLibrary/list',
    method: 'get',
    params: query
  })
}

// 查询精品项目库详细
export function getProjectLibrary(guid) {
  return request({
    url: '/projectWorkbench/projectLibrary/' + guid,
    method: 'get'
  })
}

// 查询精品项目库详细
export function getInfoByProjectId(projectId) {
  return request({
    url: '/projectWorkbench/projectLibrary/getInfoByProjectId/' + projectId,
    method: 'get'
  })
}

// 新增精品项目库
export function addProjectLibrary(data) {
  return request({
    url: '/projectWorkbench/projectLibrary',
    method: 'post',
    data: data
  })
}

// 修改精品项目库
export function updateProjectLibrary(data) {
  return request({
    url: '/projectWorkbench/projectLibrary',
    method: 'put',
    data: data
  })
}

// 删除精品项目库
export function delProjectLibrary(guid) {
  return request({
    url: '/projectWorkbench/projectLibrary/' + guid,
    method: 'delete'
  })
}

// 导出精品项目库
export function exportProjectLibrary(query) {
  return request({
    url: '/projectWorkbench/projectLibrary/export',
    method: 'get',
    params: query
  })
}